package service

import (
	"gorm.io/gorm"
	"table-compare/db"
)

type ColumnService struct {
	db *gorm.DB
}

func (s *ColumnService) GetColumnsByTableId(tableId uint) []db.Column {
	var rs []db.Column
	s.db.Model(&db.Column{}).Where(db.Column{TableId: tableId}).Order("ID asc").Find(&rs)
	return rs
}
